import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import set from '@dfeidao/atom-web/local/set';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import render from '@dfeidao/atom-web/render/render';
import set_node_cls from '@dfeidao/atom-web/ui/set-node-cls';
import p001 from './p001';

export default async function a001(fd: IFeidaoAiBrowserComponent, no: string) {
	// todo
	console.log('zj-000006:a001-------start');
	fd.data.node.style.display = 'block';
	const n = fd.data.node.querySelector<HTMLDivElement>('[data-id="record"]');
	set_node_cls(n, 'display-n', false);// 显示记录弹框

	set(fd, 'no', no);// 保存传递过来的编号
	const res = await nodejs<{ res: Array<{}>, c: number }>('wyf/zj-000006/s001', {
		filter: {
			hidden_source_feature_no: no,
			pn: 1
		}
	});
	console.log(res);
	render(fd, res, p001, 'p001', 'inner');

	console.log('zj-000006:a001-------end');
}
